diff --git a/resources/icons/map_grayed.ico b/resources/icons/map_grayed.ico new file mode 100644 index 00000000..86c3f5fb Binary files /dev/null and b/resources/icons/map_grayed.ico differ diff --git a/resources/images.qrc b/resources/images.qrc index 2399cbe9..e90d5849 100644 --- a/resources/images.qrc +++ b/resources/images.qrc @@ -17,6 +17,7 @@ icons/map_edited.ico icons/map_opened.ico icons/map.ico + icons/map_grayed.ico icons/move.ico icons/pencil_cursor.ico icons/pencil.ico diff --git a/src/mainwindow.cpp b/src/mainwindow.cpp index 9edf6262..c503d23d 100644 --- a/src/mainwindow.cpp +++ b/src/mainwindow.cpp @@ -368,7 +368,7 @@ void MainWindow::showWindowTitle() { else if (editor->layout) { setWindowTitle(QString("%1%2 - %3") .arg(editor->layout->hasUnsavedChanges() ? "* " : "") - .arg(editor->layout->id) + .arg(editor->layout->name) .arg(editor->project->getProjectTitle()) ); } @@ -1646,7 +1646,7 @@ void MainWindow::setClipboardData(QImage image) { } void MainWindow::paste() { - if (!editor || !editor->project || !editor->map) return; + if (!editor || !editor->project || !(editor->map || editor->layout)) return; QClipboard *clipboard = QGuiApplication::clipboard(); QString clipboardText(clipboard->text()); diff --git a/src/ui/maplistmodels.cpp b/src/ui/maplistmodels.cpp index dcf23207..e243541e 100644 --- a/src/ui/maplistmodels.cpp +++ b/src/ui/maplistmodels.cpp @@ -180,6 +180,7 @@ QVariant MapGroupModel::data(const QModelIndex &index, int role) const { int col = index.column(); if (role == Qt::DecorationRole) { + static QIcon mapGrayIcon = QIcon(QStringLiteral(":/icons/map_grayed.ico")); static QIcon mapIcon = QIcon(QStringLiteral(":/icons/map.ico")); static QIcon mapEditedIcon = QIcon(QStringLiteral(":/icons/map_edited.ico")); static QIcon mapOpenedIcon = QIcon(QStringLiteral(":/icons/map_opened.ico")); @@ -206,8 +207,11 @@ QVariant MapGroupModel::data(const QModelIndex &index, int role) const { if (this->project->mapCache.value(mapName)->hasUnsavedChanges()) { return mapEditedIcon; } + else { + return mapIcon; + } } - return mapIcon; + return mapGrayIcon; } // check if map or group