Skip to content

[FIX] Warning about a window title without a placeholder#3554

Merged
janezd merged 1 commit intobiolab:masterfrom
thocevar:placeholder
Jan 28, 2019
Merged

[FIX] Warning about a window title without a placeholder#3554
janezd merged 1 commit intobiolab:masterfrom
thocevar:placeholder

Conversation

@thocevar
Copy link
Contributor

Issue

Fixes #3267

Description of changes

Append "[*]" placeholder to the window title (if it's not already present) before calling setWindowTitle.

Includes
  • Code changes
  • Tests
  • Documentation

@ales-erjavec
Copy link
Contributor

The warning in gh-3267 probably comes from CanvasMainWindow not OWWidget. That uses windowFilePath.

Maybe try:

diff --git a/Orange/canvas/application/canvasmain.py b/Orange/canvas/application/canvasmain.py
index 4d0cee46c..500100a80 100644
--- a/Orange/canvas/application/canvasmain.py
+++ b/Orange/canvas/application/canvasmain.py
@@ -230,7 +230,7 @@ class CanvasMainWindow(QMainWindow):
         frame.setWidget(self.scheme_widget)
 
         # Window 'title'
-        self.setWindowFilePath(self.scheme_widget.path())
+        self.setWindowFilePath(self.scheme_widget.path() or " ")
         self.scheme_widget.pathChanged.connect(self.setWindowFilePath)
         self.scheme_widget.modificationChanged.connect(self.setWindowModified)
 

@thocevar
Copy link
Contributor Author

You're right.

@thocevar thocevar changed the title [FIX] Add [*] placeholder to window titles. [FIX] Warning about a window title without a placeholder Jan 28, 2019
@codecov
Copy link

codecov bot commented Jan 28, 2019

Codecov Report

Merging #3554 into master will decrease coverage by <.01%.
The diff coverage is n/a.

@@            Coverage Diff             @@
##           master    #3554      +/-   ##
==========================================
- Coverage   83.96%   83.95%   -0.01%     
==========================================
  Files         370      370              
  Lines       66876    66876              
==========================================
- Hits        56152    56146       -6     
- Misses      10724    10730       +6

@janezd janezd merged commit b944c1c into biolab:master Jan 28, 2019
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants