mirror of
https://github.com/overte-org/overte.git
synced 2025-04-20 18:23:54 +02:00
EditorWindow on-top behavior fixed
This commit is contained in:
parent
89aafd9c3f
commit
c20381a0ea
3 changed files with 5 additions and 5 deletions
|
@ -126,7 +126,7 @@ void ScriptEditorWidget::loadFile(const QString& scriptPath) {
|
|||
loop.exec();
|
||||
_scriptEditorWidgetUI->scriptEdit->setPlainText(reply->readAll());
|
||||
if (!saveAs()) {
|
||||
emit static_cast<ScriptEditorWindow*>(this->parent()->parent()->parent())->terminateCurrentTab();
|
||||
static_cast<ScriptEditorWindow*>(this->parent()->parent()->parent())->terminateCurrentTab();
|
||||
}
|
||||
}
|
||||
|
||||
|
|
|
@ -34,7 +34,7 @@ ScriptEditorWindow::ScriptEditorWindow() :
|
|||
_saveMenu(new QMenu)
|
||||
{
|
||||
_ScriptEditorWindowUI->setupUi(this);
|
||||
this->setWindowFlags(Qt::Tool | Qt::WindowStaysOnTopHint);
|
||||
this->setWindowFlags(Qt::Tool);
|
||||
show();
|
||||
addScriptEditorWidget("New script");
|
||||
connect(_loadMenu, SIGNAL(aboutToShow()), this, SLOT(loadMenuAboutToShow()));
|
||||
|
@ -206,5 +206,6 @@ void ScriptEditorWindow::updateScriptNameOrStatus() {
|
|||
void ScriptEditorWindow::terminateCurrentTab() {
|
||||
if (_ScriptEditorWindowUI->tabWidget->currentIndex() != -1) {
|
||||
_ScriptEditorWindowUI->tabWidget->removeTab(_ScriptEditorWindowUI->tabWidget->currentIndex());
|
||||
this->raise();
|
||||
}
|
||||
}
|
||||
|
|
|
@ -25,6 +25,8 @@ public:
|
|||
ScriptEditorWindow();
|
||||
~ScriptEditorWindow();
|
||||
|
||||
void terminateCurrentTab();
|
||||
|
||||
protected:
|
||||
void closeEvent(QCloseEvent* event);
|
||||
|
||||
|
@ -37,9 +39,6 @@ private:
|
|||
void setRunningState(bool run);
|
||||
void setScriptName(const QString& scriptName);
|
||||
|
||||
public slots:
|
||||
void terminateCurrentTab();
|
||||
|
||||
private slots:
|
||||
void loadScriptMenu(const QString& scriptName);
|
||||
void loadScriptClicked();
|
||||
|
|
Loading…
Reference in a new issue