[gnote/tabbed: 8/19] Remove size applyging from template




commit 83827cd340c9380f165e4c503f593397541ab0e7
Author: Aurimas Černius <aurisc4 gmail com>
Date:   Sun Oct 24 17:19:38 2021 +0300

    Remove size applyging from template

 src/notemanager.cpp     |  8 +-------
 src/notemanagerbase.cpp | 10 +---------
 2 files changed, 2 insertions(+), 16 deletions(-)
---
diff --git a/src/notemanager.cpp b/src/notemanager.cpp
index 0f6801a7..5dda9c96 100644
--- a/src/notemanager.cpp
+++ b/src/notemanager.cpp
@@ -1,7 +1,7 @@
 /*
  * gnote
  *
- * Copyright (C) 2010-2014,2017,2019-2020 Aurimas Cernius
+ * Copyright (C) 2010-2014,2017,2019-2021 Aurimas Cernius
  * Copyright (C) 2010 Debarshi Ray
  * Copyright (C) 2009 Hubert Figuiere
  *
@@ -306,12 +306,6 @@ namespace gnote {
     }
 
     // Copy template note's properties
-    Tag::Ptr template_save_size = 
m_tag_manager.get_or_create_system_tag(ITagManager::TEMPLATE_NOTE_SAVE_SIZE_SYSTEM_TAG);
-    if(template_note->data().has_extent() && template_note->contains_tag(template_save_size)) {
-      new_note->data().height() = template_note->data().height();
-      new_note->data().width() = template_note->data().width();
-    }
-
     Glib::RefPtr<Gtk::TextBuffer> buffer = std::static_pointer_cast<Note>(new_note)->get_buffer();
     Gtk::TextIter cursor, selection;
     Tag::Ptr template_save_selection = 
m_tag_manager.get_or_create_system_tag(ITagManager::TEMPLATE_NOTE_SAVE_SELECTION_SYSTEM_TAG);
diff --git a/src/notemanagerbase.cpp b/src/notemanagerbase.cpp
index e67b56b9..63eefa06 100644
--- a/src/notemanagerbase.cpp
+++ b/src/notemanagerbase.cpp
@@ -1,7 +1,7 @@
 /*
  * gnote
  *
- * Copyright (C) 2010-2014,2016-2017,2019-2020 Aurimas Cernius
+ * Copyright (C) 2010-2014,2016-2017,2019-2021 Aurimas Cernius
  * Copyright (C) 2009 Hubert Figuiere
  *
  * This program is free software: you can redistribute it and/or modify
@@ -272,14 +272,6 @@ NoteBase::Ptr NoteManagerBase::create_note_from_template(const Glib::ustring & t
   xml_content = sanitize_xml_content(xml_content);
 
   NoteBase::Ptr new_note = create_new_note(new_title, xml_content, guid);
-
-  // Copy template note's properties
-  Tag::Ptr template_save_size = 
tag_manager().get_or_create_system_tag(ITagManager::TEMPLATE_NOTE_SAVE_SIZE_SYSTEM_TAG);
-  if(template_note->data().has_extent() && template_note->contains_tag(template_save_size)) {
-    new_note->data().height() = template_note->data().height();
-    new_note->data().width() = template_note->data().width();
-  }
-
   return new_note;
 }
 


[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]