-
Notifications
You must be signed in to change notification settings - Fork 22
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
* Removed the lambda that listens to `QAbstractItemModel::dataChanged` signal of `treeModel` to update the subwindow title for opened editors. * Changed the `BaseEditor::dataChanged` slot to update the subwindow title. * Changed `MainWindow::openSubWindow` to set the subwindow title directly on the editor widget that is used to create the subwindow. This stops the subwindow title from overriding the one set in the `BaseEditor::dataChanged` slot. * Changed `TreeModel::setData` to compare the old and new name and short-circuit without firing any signals if they are the same. * Added a `ResourceRenamed` signal to `TreeModel` that has the same signature as the signal emitted by `BaseEditor`. * Changed `ResourceModelMap::ResourceRenamed` slot to compare the old and new name and short-circuit if they are the same or if there was no entry for a resource under the old name. Also made it remove the entry under the old name instead of setting it to a `nullptr` which should be safer and keep the map from growing unnecessarily large. * Connected the `treeModel` to `resMap` so the latter is informed of when resources are renamed directly from the tree via an edit trigger. This fixes a crash that occurs when attempting to open the editor of a resource after just having renamed it in the tree. * Connected the `treeModel` to `res` in `MainWindow::openSubWindow` so `res` knows when the resource is renamed from the tree. This ensures the subwindow title is updated when the resource is renamed from the tree. * Changed `ProtoModel` constructor to forward its `dataChanged` signal that provides the old value as the `QAbstractItemModel` signal by the same name which doesn't. This ensures that components, like ImmediateMapper, that listen for the old signal will still receive the signal even if they don't care about the optional parameter.
- Loading branch information
1 parent
67bbf72
commit cab1e51
Showing
6 changed files
with
25 additions
and
15 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters